
#include "iostream"
#include "vector"
#include "unordered_map"
#include "algorithm"

class Solution{
public:
    bool read(){
        bool ret_ok= true;
        bool wait_for_num= true;
        int sum=0;
        bool add= true;
        while(1){
            if(wait_for_num){
                int a;
                std::cin>>a;
                if(add){
                    sum+=a;
                }else{
                    sum-=a;
                }
                wait_for_num=false;
            }else{
                char a=std::cin.get();
                if(a=='\n'){
                    break;
                }else if(a==EOF){
                    ret_ok=false;
                    break;
                }else if(a=='+'){
                    add= true;
                    wait_for_num= true;
                }else if(a=='-'){
                    add=false;
                    wait_for_num= true;
                }
            }
        }
        printf("%d\n",sum);
        return ret_ok;
    }
};
int main() {
    while(1){
        Solution s;
        if(!s.read()){
            break;
        }
    }
    return 0;
}

